package apralms

class LoginTagLib {
	
	def loginControl = {
		if(request.getSession(false) && session.user){
			out << "欢迎 ${session.user.login} "
			out << """[${link(action:"logout", controller:"user"){"登出"}}]"""
		} else {
			out << """[${link(action:"login", controller:"user"){"登入"}}]"""
		}
	}
	
}